import HttpRequest from './axios'
const request = new HttpRequest()

/**
 * 获取类目
 */
export const getCategoryList = () => request.post('/category/list')

// export const getAuthCode = () => request.post('')

export const checkLogin = (data) => request.post('/zzdLogin/check?zzdToken=' + data)

export const zzdLogin = (data) => request.post('/zzdLogin/login?_args=' + encodeURI(JSON.stringify(data)))

// export const getFlowList = (data) => request.post('/zzd/getFlowList', {_args: encodeURI(JSON.stringify(data)), zzdToken: token })
export const getFlowList = (data, token) => request.post('/zzd/getFlowList?_args=' + encodeURI(JSON.stringify(data)) + '&zzdToken=' + token)

export const getFlowDetail = (data, token) => request.post('/zzd/getFlowDetail?_args=' + encodeURI(JSON.stringify(data)) + '&zzdToken=' + token)

export const getFlowrecord = (data, token) => request.post('/zzd/flowrecord?_args=' + encodeURI(JSON.stringify(data)) + '&zzdToken=' + token)

export const getFileList = (data, token) => request.post('/zzd/fileList?_args=' + encodeURI(JSON.stringify(data)) + '&zzdToken=' + token)

export const getFileDown = (data, token) => request.get('/zzd/fileDownload?_args=' + encodeURI(JSON.stringify(data)) + '&zzdToken=' + token)

export const getFlowuser = (data, token) => request.post('/zzd/flowuser?_args=' + encodeURI(JSON.stringify(data)) + '&zzdToken=' + token)

export const getflowSub = (data, token) => request.post('/zzd/flowSub?_args=' + encodeURI(JSON.stringify(data)) + '&zzdToken=' + token)

export const doLogout = (token) => request.post('/zzd/userUnbind?&zzdToken=' + token)

export const getCaptcha = () => request.get('/captchaBase64')